package com.adel.springIoc.dao;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.adel.springIoc.beans.User;
@Service
@Qualifier("dao")
public class UserDaoImpl2 implements UserDao {
	List<User> users = new ArrayList<User>();
	
	public User getUserById(Integer id) {
		return null;
	}

	public int saveUser(User user) {
		users.add(user);
		return users.size();
	}

	public int updateUser(User user) {
		// TODO Auto-generated method stub
		return 0;
	}

	public void deleteUser(User user) {
		// TODO Auto-generated method stub

	}

	public List<User> getUsers() {
		System.out.println("UserDaoImpl2");
		return users;
	}

}
